import App from './App'

// #ifndef VUE3
import Vue from 'vue'
import uView from "uview-ui"; 
Vue.config.productionTip = false
Vue.use(uView);

Vue.mixin({
	onPullDownRefresh(){
		let page = getCurrentPages()
		uni.showToast({
			title: '刷新成功',
			duration: 2000,
		}).then(res=>{
			uni.redirectTo({
				url:page[page.length-1].$page.fullPath
			})
		})
		uni.stopPullDownRefresh()
	},
	onShareAppMessage(res){
		console.log(res)
	},
	onShareTimeline(res){
		console.log(res)
	}
})

App.mpType = 'app'
const app = new Vue({
    ...App
})
app.$mount()
// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif